<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 找到所有消失的数字 -->
    <script>
      var find = function (nums) {
        const set = new Set(nums)
        const res = []
        for (let i = 1; i <= nums.length; i++) {
          if (!set.has(i)) {
            res.push(i)
          }
        }
        return res
      }
      // console.log(find([4, 3, 2, 7, 8, 2, 3, 1]))
      console.log(find([1, 1]))
    </script>
  </body>
</html>
